<template>
<div class="user">
  <h2>User：{{$route.params}}</h2>
</div>
</template>

<script setup>
import {useRoute,onBeforeRouteUpdate} from 'vue-router'

onBeforeRouteUpdate((to,from)=>{
  console.log("to:",to.params)
  console.log("from:",from.params)
})

</script>

<style scoped>

</style>